﻿using System;

namespace OWASP.CodeReview.CodeCrawler.Engine.Exceptions
{
    // Dev Notes
    // Always inherit custom exceptions from ApplicationException instead
    // of System.Exception has it has been designed to catch exceptions at CLR
    // level instead of Application Level

    /// <summary>
    /// 
    /// </summary>
    class EngineExceptions : ApplicationException  {

        public override string Message { get
            { return base.Message; }
        }
    }

    /// <summary>
    /// 
    /// </summary>
    class UnableToLocateDatabaseException : ApplicationException
    {
        public override string Message { get
            { return "Code Crawler is unable to locate a valid database to compare your code with. Without this file CC is unable to start"; }
        }
    }

    /// <summary>
    /// 
    /// </summary>
    class UnableToLocateReportsDirectoryException : ApplicationException {
        public override string Message {
            get { return "Code Crawler is unable to locate an existing Report Folder, if this is your first time running Code Crawler please ensure the folder structure is defined as it should.";}
        }
    }

    /// <summary>
    /// 
    /// </summary>
    class SourceCodeFileDoesntExistAnyMoreException : ApplicationException {
        public override string Message {
            get { return "Source Code file has been deleted while Code Crawler was running"; }
        }
    }
}
